package com.ayf.payment.game.api.service.impl;

import com.ayf.payment.game.api.entity.MerchantProxyRel;
import com.ayf.payment.game.api.mapper.MerchantProxyRelMapper;
import com.ayf.payment.game.api.service.MerchantProxyRelService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class MerchantProxyRelServiceImpl implements MerchantProxyRelService {

    @Resource
    private MerchantProxyRelMapper merchantProxyRelMapper;

    @Override
    public boolean checkProxyLowerMerchantId(Integer merchantId, Integer lowerMerchantId) {
        MerchantProxyRel merchantProxyRel = new MerchantProxyRel();
        merchantProxyRel.setMerchantId(merchantId);
        merchantProxyRel.setLowerId(lowerMerchantId);
        int num = merchantProxyRelMapper.selectCount(merchantProxyRel);
        return num>0?true:false;
    }
}

